projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13b37b0
)
testsuite: Fix a memory leak in the bitmask tests
author
Matthias Clasen
<mclasen@redhat.com>
Wed, 8 Jul 2020 20:34:58 +0000
(16:34 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Wed, 8 Jul 2020 21:44:16 +0000
(17:44 -0400)
This was showing up when running under asan.
testsuite/gtk/bitmask.c
patch
|
blob
|
history
diff --git
a/testsuite/gtk/bitmask.c
b/testsuite/gtk/bitmask.c
index 75aec409a7abcd6cfe58f451060d713dddfb3835..167e729ea7640c832a78b9a8337ec93bbdb407b2 100644
(file)
--- a/
testsuite/gtk/bitmask.c
+++ b/
testsuite/gtk/bitmask.c
@@
-316,7
+316,13
@@
test_subtract_hardcoded (void)
left_str++;
}
- g_test_message ("%s - %s\n", _gtk_bitmask_to_string (left), _gtk_bitmask_to_string (right));
+ {
+ char *sl = _gtk_bitmask_to_string (left);
+ char *sr = _gtk_bitmask_to_string (right);
+ g_test_message ("%s - %s\n", sl, sr);
+ g_free (sl);
+ g_free (sr);
+ }
subtracted = _gtk_bitmask_subtract (_gtk_bitmask_copy (left), right);
assert_cmpmasks (subtracted, expected);